<%--
  制造报表
  User: Ivan
  Date: 2019-09-03 12:01
--%>
<style>
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/MakeReport/makeReport"
          method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="makeReport"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <g:hiddenField name="yanchi" value="${params.yanchi}"/>
            <g:hiddenField name="naqi" value="${params.naqi}"/>
            <label>订单计划日期：</label>
            <input type="text" name="startTime" data-pattern="yyyy-MM-dd" size="11" value="${startTime}"
                   data-toggle="datepicker" placeholder="订单计划开始">
            <input type="text" name="endTime" data-pattern="yyyy-MM-dd" size="11" value="${endTime}"
                   data-toggle="datepicker" placeholder="订单计划结束">&nbsp;
            <label>PONO：</label>
            <input type="text" name="pono" value="${pono}" size="15" placeholder="PONO"/>&nbsp;
            <label>订单号：</label>
            <input type="text" name="docId" value="${docId}" size="15" placeholder="订单号"/>&nbsp;
            <label>IPN：</label>
            <input type="text" name="ipn" value="${ipn}" size="15" placeholder="IPN"/>&nbsp;
            <label>箱号：</label>
            <input type="text" name="caseNum" value="${caseNum}" size="15" placeholder="箱号"/>
            <br/><br/>
            <label>部件IPN：</label>
            <input type="text" name="sipn" value="${sipn}" size="15" placeholder="部件IPN"/>&nbsp;
            <label>部件VPN：</label>
            <input type="text" name="vpn" value="${vpn}" size="15" placeholder="部件VPN"/>&nbsp;
            <label>刻印号：</label>
            <input type="text" name="kyh" value="${kyh}" size="15" placeholder="刻印号"/>&nbsp;
        %{--<label>客户LOT：</label>--}%
        %{--<input type="text" name="customerLot" value="${customerLot}" size="15" placeholder="客户LOT"/>&nbsp;--}%
            <label>客户名称：</label>
            <g:select name="khmc" from="${makeReportKhmc}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="CUSTOM_NAME" optionValue="CUSTOM_NAME" value="${khmc}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>清洗属性：</label>
            <g:select name="qxsx" from="${makeReportQxsx}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="CLEAN_PRO" optionValue="CLEAN_PRO" value="${qxsx}"
                      noSelection="['': '-- All --']"/>
            <br/><br/>
            <label>工步：</label>
            <g:select name="stepDesc" from="${makeReportStepDesc}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="STEP_DESC" optionValue="STEP_DESC" value="${stepDesc}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>订单状态：</label>
            <g:select name="docState" from="${makeReportDocState}" data-width="200" class="selectpicker"
                      data-live-search="true" data-live-search-placeholder="查找" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="doc_state" optionValue="doc_state" value="${docState}"
                      multiple="multiple"/>&nbsp;
            %{--<label>工段：</label>--}%
            %{--<g:select name="stageDesc" from="${makeReportStageDesc}" data-width="200" class="selectpicker"--}%
            %{--data-live-search="true" data-live-search-placeholder="查找" data-toggle="selectpicker"--}%
            %{--data-actions-box="true" optionKey="description" optionValue="description" value="${stageDesc}"--}%
            %{--multiple="multiple"/>&nbsp;--}%
            <label>包装：</label>
            <g:select name="package1" from="${makeReportPackageState}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="PACKAGE_STATE" optionValue="PACKAGE_STATE" value="${package1}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>达成状态：</label>
            <g:select name="fahuo" from="${makeReportFahuoState}" data-width="200" class="selectpicker"
                      data-live-search="true" data-live-search-placeholder="查找" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="fahuo_state" optionValue="fahuo_state" value="${fahuo}"
                      multiple="multiple"/>
            <br/><br/>
            <label>状态：</label>
            <g:select name="wipState" from="${wipStateList}" data-width="200" class="selectpicker"
                      data-live-search="true" data-live-search-placeholder="查找" data-toggle="selectpicker"
                      data-actions-box="true" optionKey="WIP_STATE" optionValue="WIP_STATE" value="${wipState}"
                      multiple="multiple"/>&nbsp;
            <label>事务日期：</label>
            <input type="text" name="affStartTime" data-pattern="yyyy-MM-dd" size="12" value="${affStartTime}"
                   data-toggle="datepicker" placeholder="事务开始">
            <input type="text" name="affEndTime" data-pattern="yyyy-MM-dd" size="12" value="${affEndTime}"
                   data-toggle="datepicker" placeholder="事务结束">&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/Base/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${makeReport.size() > 0}">
        <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true" data-toggle="tablefixed" data-width="350%">
            <thead>
            <tr id="t1">
                <th width="50">NO.</th>
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance != 'RN' && headInstance != 'CREATE_TIME' && headInstance != 'YANCHI' && headInstance != 'NAQI'}">
                        <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:each in="${makeReport}" status="i" var="dataInstance">
                <tr>
                    <td data-id="data">${dataInstance.RN}</td>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance != 'RN' && headInstance != 'CREATE_TIME' && headInstance != 'YANCHI' && headInstance != 'NAQI'}">
                            <td>${dataInstance["${headInstance}"]}</td>
                        </g:if>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/pagination"/>